/**
 * 文件名：OrderWorkflow.java
 *
 * 创建人：Fyh - 1009173473@qq.com
 *
 * 创建时间：2020年9月22日 上午9:19:39
 *
 * 版权所有：南京植百汇智能科技服务有限公司
 */
package com.z100h.supplychain.order.enums;

/**
 * [描述信息：说明类的基本功能]
 *
 * @author Fyh - 1009173473@qq.com
 * @version 1.0 Created on 2020年9月22日 上午9:19:39
 */
public enum OrderWorkflow {

	BUSINESS("创建人", "0"), OPERATION("商务", "1"), FINANCE("财务", "2"), BASE("基地", "3"), LOGISTICS("物流",
			"4"), PURCHASE("采购", "5"), FINISH("全流程结束", "99");

	private String name;

	private String type;

	private OrderWorkflow(String name, String type) {
		this.name = name;
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public static OrderWorkflow get(String orderWorkflowState) {
		switch (orderWorkflowState) {
			case "0":
				return BUSINESS;
			case "1":
				return OPERATION;
			case "2":
				return FINANCE;
			case "3":
				return BASE;
			case "5":
				return PURCHASE;
			case "99":
				return FINISH;
			default:
				return LOGISTICS;
		}
	}
}
